Field of the Invention
The present invention relates to an encoding technique for image data of a Bayer arrangement.
Description of the Related Art
An image capturing apparatus represented by a digital camera generally includes an image sensor of a Bayer arrangement. The Bayer arrangement is a structure with red (R), green (G), and blue (B) pixels arranged in a mosaic. Additionally, 2×2 pixels in the Bayer arrangement include one red pixel (R), two green pixels (G0 and G1), and one blue pixel (B). Hence, the pixels of image data immediately after imaging by the image sensor also have the Bayer arrangement.
Each pixel of the image data of the Bayer arrangement has only the information of one color component, as described above. Hence, interpolation processing called demosaicing is generally applied to the image data of the Bayer arrangement to generate image data in which one pixel includes a plurality of components of R (red), G (green) and B (blue). From the viewpoint of a recording or transfer efficiency, the image data obtained by demosaicing is encoded to compress the data amount. JPEG (Joint Photographic Experts Group) that is representative compression coding transforms image data in the RGB color space into image data in the YUV color space and then compression-codes the image data. However, if the number of bits per component is the same, the data amount of the image data after demosaicing is three-times larger than the data amount of the image data of the Bayer arrangement before demosaicing. That is, JPEG encodes image data whose data amount is three-times larger than that of the image data of the Bayer arrangement.
There is known a technique of separating image data of the Bayer arrangement into components (R, G0, B, and G1) and independently encoding the image data of each component without performing demosaicing (for example, Japanese Patent Laid-Open No. 2003-125209 that will be referred to as literature 1 hereinafter).
Half of the pixels included in image data of the Bayer arrangement are the G component pixels. Hence, how to efficiently encode the G component pixels is important. In the method of literature 1, a G0 component and a G1 component, whose original pixel positions are close and which are of the same color and have a high correlation, are separated into different components. For this reason, wavelet transformation in encoding processing is performed in a state in which the image data of the Bayer arrangement is sub-sampled. Hence, folding noise is applied when separating the high-frequency component and the low-frequency component, resulting in a lower compression ratio.
There is also known a technique of performing color space transformation of image data of the Bayer arrangement to generate one luminance component (Y) and three color difference components (Dg, Co, and Cg) and encoding the image data of each component (for example, Japanese Patent Laid-Open No. 2006-121669 that will be referred to as literature 2 hereinafter). This is one of compression efficiency improving methods aiming at reducing redundant data on a color component basis, and uses the visual sensitivity of human eyes that are sensitive to the luminance component. In this method, the Dg component is represented by G1-G0 (a high-pass filter by differentiation), and a high-frequency component corresponding to the G component is calculated. In literature 2, however, since a low-frequency component corresponding to the G component is not calculated, there is still room for improvement of the compression efficiency.